Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support symbol stroke and opacity #12

Merged
merged 11 commits into from
Jan 7, 2024
Merged

Conversation

jonmmease
Copy link
Owner

@jonmmease jonmmease commented Jan 7, 2024

This PR adds support for strokes around symbol marks for both circle and path shapes. Also adds support for fill and stroke opacity.

Supporting strokes while drawing symbols of varying sizes using instancing is a bit subtle. If you simply scale the stroke vertices along with the fill vertices to change the symbols size, the stroke will be thicker for large marks and thinner for small marks. To compensate for this, the stroke vertex normals (as returned by lyon) are transferred to the vertex shader and the stroke vertices are shifted along their normal vector to generate consistent sizing.

@jonmmease jonmmease merged commit 780be1f into main Jan 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant